home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_qt.idb / usr / freeware / include / Qt / qdrawutil.h.z / qdrawutil.h
Encoding:
C/C++ Source or Header  |  1998-10-28  |  3.4 KB  |  106 lines

  1. /****************************************************************************
  2. ** $Id: qdrawutil.h,v 2.8 1998/07/03 00:09:32 hanord Exp $
  3. **
  4. ** Definition of draw utilities
  5. **
  6. ** Created : 950920
  7. **
  8. ** Copyright (C) 1992-1998 Troll Tech AS.  All rights reserved.
  9. **
  10. ** This file is part of Qt Free Edition, version 1.40.
  11. **
  12. ** See the file LICENSE included in the distribution for the usage
  13. ** and distribution terms, or http://www.troll.no/free-license.html.
  14. **
  15. ** IMPORTANT NOTE: You may NOT copy this file or any part of it into
  16. ** your own programs or libraries.
  17. **
  18. ** Please see http://www.troll.no/pricing.html for information about 
  19. ** Qt Professional Edition, which is this same library but with a
  20. ** license which allows creation of commercial/proprietary software.
  21. **
  22. *****************************************************************************/
  23.  
  24. #ifndef QDRAWUTIL_H
  25. #define QDRAWUTIL_H
  26.  
  27. #ifndef QT_H
  28. #include "qpainter.h"
  29. #include "qpalette.h"
  30. #endif // QT_H
  31.  
  32.  
  33. //
  34. // Standard shade drawing
  35. //
  36.  
  37. void qDrawShadeLine( QPainter *p, int x1, int y1, int x2, int y2,
  38.              const QColorGroup &g, bool sunken = TRUE,
  39.              int lineWidth = 1, int midLineWidth = 0 );
  40.  
  41. void qDrawShadeLine( QPainter *p, const QPoint &p1, const QPoint &p2,
  42.              const QColorGroup &g, bool sunken = TRUE,
  43.              int lineWidth = 1, int midLineWidth = 0 );
  44.  
  45. void qDrawShadeRect( QPainter *p, int x, int y, int w, int h,
  46.              const QColorGroup &, bool sunken=FALSE,
  47.              int lineWidth = 1, int midLineWidth = 0,
  48.              const QBrush *fill = 0 );
  49.  
  50. void qDrawShadeRect( QPainter *p, const QRect &r,
  51.              const QColorGroup &, bool sunken=FALSE,
  52.              int lineWidth = 1, int midLineWidth = 0,
  53.              const QBrush *fill = 0 );
  54.  
  55. void qDrawShadePanel( QPainter *p, int x, int y, int w, int h,
  56.               const QColorGroup &, bool sunken=FALSE,
  57.               int lineWidth = 1, const QBrush *fill = 0 );
  58.  
  59. void qDrawShadePanel( QPainter *p, const QRect &r,
  60.               const QColorGroup &, bool sunken=FALSE,
  61.               int lineWidth = 1, const QBrush *fill = 0 );
  62.  
  63. void qDrawWinButton( QPainter *p, int x, int y, int w, int h,
  64.              const QColorGroup &g, bool sunken = FALSE,
  65.              const QBrush *fill = 0 );
  66.  
  67. void qDrawWinButton( QPainter *p, const QRect &r,
  68.              const QColorGroup &g, bool sunken = FALSE,
  69.              const QBrush *fill = 0 );
  70.  
  71. void qDrawWinPanel( QPainter *p, int x, int y, int w, int h,
  72.             const QColorGroup &, bool sunken=FALSE,
  73.             const QBrush *fill = 0 );
  74.  
  75. void qDrawWinPanel( QPainter *p, const QRect &r,
  76.             const QColorGroup &, bool sunken=FALSE,
  77.             const QBrush *fill = 0 );
  78.  
  79. void qDrawPlainRect( QPainter *p, int x, int y, int w, int h, const QColor &,
  80.              int lineWidth = 1, const QBrush *fill = 0 );
  81.  
  82. void qDrawPlainRect( QPainter *p, const QRect &r, const QColor &,
  83.              int lineWidth = 1, const QBrush *fill = 0 );
  84.  
  85.  
  86. //
  87. // Other useful drawing functions
  88. //
  89.  
  90. QRect qItemRect( QPainter *p, GUIStyle gs, int x, int y, int w, int h,
  91.         int flags, bool enabled,
  92.         const QPixmap *pixmap, const char *text, int len=-1 );
  93.  
  94. void qDrawItem( QPainter *p, GUIStyle gs, int x, int y, int w, int h,
  95.         int flags, const QColorGroup &g, bool enabled,
  96.         const QPixmap *pixmap, const char *text, int len=-1 );
  97.  
  98. enum ArrowType
  99.     { UpArrow, DownArrow, LeftArrow, RightArrow };
  100.  
  101. void qDrawArrow( QPainter *p, ArrowType type, GUIStyle style, bool down,
  102.          int x, int y, int w, int h,
  103.          const QColorGroup &g, bool enabled );
  104.  
  105. #endif // QDRAWUTIL_H
  106.